package org.datascooter.cglib.proxy;

import org.datascooter.utils.LangUtils;

public class ValueHolder {

	private Object oldValue;
	private Object value;

	public ValueHolder(Object oldValue) {
		this.oldValue = oldValue;
		value = oldValue;
	}

	public Object getOldValue() {
		return oldValue;
	}

	public void setOldValue(Object oldValue) {
		this.oldValue = oldValue;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public boolean changed() {
		return LangUtils.equalsAnyWay(value, oldValue);
	}
}
